package top.timous;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * web.xml注解方式的配置
 */
public class EpidemicApplication extends AbstractAnnotationConfigDispatcherServletInitializer {
    //引入对应的配置文件

    /**
     * 引入spring的配置类
     * @return
     */

    protected Class<?>[] getRootConfigClasses() {
        Class[] classes = new Class[]{SpringConfig.class};
        return classes;
    }

    /**
     * 引入springmvc的配置类
     * @return
     */
    protected Class<?>[] getServletConfigClasses() {
        // 引入spring
        Class[] classes = new Class[]{SpringMvcConfig.class};
        return classes;
    }

    /**
     * 拦截器的拦截规则
     * @return
     */
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
